class MyArray{
    Object[] array = new Object[10];

    public Object get(int pos) {
        return this.array[pos];
    }
    public void set(int pos,Object val) {
        this.array[pos] = val;
    }
}

public class Test2 {
    public static void main(String[] args) {
        MyArray myArray = new MyArray();
        myArray.set(0,"hh");
        myArray.set(1,1);

        Object o = myArray.get(0);
        System.out.println(o);

        int i = (int)myArray.get(1);
        System.out.println(i);
    }
}
